<!DOCTYPE html>
<html>
<head>
    <title>小窝源码</title>
    <meta charset="utf-8">
    <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
        <link rel="shortcut icon" href="__CDN__/assets/img/favicon.ico" />
  
  <style>
  		html,
  		body{
  			width: 100%;
  			height: 100%;
  		}
  		body{
  			margin: 0;
  			padding: 0;
  			background-image: url("./img/bg.jpg");
  			background-repeat: no-repeat;
  			-webkit-background-size: cover;
  			-o-background-size: cover;
  			-ms-background-size: cover;
  			background-size: cover;
  		}
  		.m-wrap{
  			position: absolute;
  			left: 0;
  			right: 0;
  			top: 0;
  			bottom: 0;
  			width: 550px;
  			height: 100%;
  			margin: 0 auto;
  			-webkit-border-radius: 4px;
  			border-radius: 4px;
  			box-shadow: 2px 3px 10px #999;
  			 
  		}
  		.m-wrap > iframe{
  			width: 100%;
  			height: 100%;
  			border: none;
  		}
  		.m-qrcode{
  			position: absolute;
  			top: 117px;
  			left: 572px;
  			width: 160px;
  			height: 202px;
  			background: #fff;
  			box-sizing: border-box;
  		}
  		.m-qrcode canvas {
  			margin: 20px;
  		}
  		.m-qrcode > .m-desc {
  			margin: 0 24px;
  			font-size: 12px;
  			color: #999999;
  			text-align: center;
  			font-family: PingFangSC-Regular;
  			bottom: 18px;
  			position: absolute;
  		}
  	</style>
</head>
<body>
	<div class="m-wrap">
		<iframe id='iframe'></iframe>
		<div class="m-qrcode">
			<div class="m-desc" id="m-desc">请扫描上方的二维码预览</div>
		</div>
	</div>
	<script src="https://sf1-ttcdn-tos.pstatp.com/obj/ttfe/tetris/jquery.min.js"></script>
	<script src="https://sf1-ttcdn-tos.pstatp.com/obj/ttfe/tetris/jquery.qrcode.min.js"></script>
	<script >
// 		var url = '/h5/index.html';//这里修改要跳转的url
		var url = 'http://app.xiaowo6.cn/h5/#/';//这里修改要跳转的url
		
		
	    var link = window.location;
		var urlparam = url+location.search;
		
        function IsPC() {
            var userAgentInfo = navigator.userAgent;
            var Agents = ["Android", "iPhone",
                        "SymbianOS", "Windows Phone",
                        "iPad", "iPod"];
            var flag = true;
            for (var v = 0; v < Agents.length; v++) {
                if (userAgentInfo.indexOf(Agents[v]) > 0) {
                    flag = false;
                    break;
                }
            }
            return flag;
        }
		if (!IsPC()) {
            window.location.href = urlparam;
		}
		
		document.getElementById("iframe").src=urlparam;
		$('.m-qrcode').qrcode({
			render: 'canvas',
            height: 120,
            width: 120,
            text: url
		});
		$('#iframe').load( function() {
			$(
				$('#iframe').contents().find('.stream-bricks')[0]
			).css('max-height', '100vh').css('overflow-y', 'auto');

			$(
				$('#iframe').contents().find('main[data-server-rendered=true]')
			).css('max-height', '100vh').css('overflow-y', 'auto');
		});
	</script>
</body>
</html>
